/*
 * This file is part of Shopping Lists Organizer software
 *
 * Copyright (C) 2011 Denis Kvita <dkvita@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef SHOPPINGLISTMW_H
#define SHOPPINGLISTMW_H

#include <QMainWindow>

class QStackedLayout;
class QString;

class shoppingListEditor;
class shoppingListsBrowser;
class shopEditor;
class expensesBrowser;

class shoppingListMW : public QMainWindow
{
	Q_OBJECT
public:
	explicit shoppingListMW(QString& password, QWidget *parent = 0);

signals:
	void pwdOk(bool s=true);

public slots:
	void switchToListEditor();
	void switchToListBrowser();
	void switchToShopEditor();
	void switchToExpensesBrowser();
	void lockLists(bool isLock);
	void about();

protected:
	virtual void closeEvent(QCloseEvent *event);

private slots:
	void init();

private:
	QString& storePwd;
	QStackedLayout *mlt;
	QAction *aSec;
	shoppingListEditor *listEditor;
	shoppingListsBrowser *listsBrowser;
	shopEditor *shopEdit;
	expensesBrowser *expBrowser;
};

#endif // SHOPPINGLISTMW_H
